import { defineStore } from 'pinia';
import { ref, reactive } from 'vue';

const useSystemConfig = defineStore(
  'systemConfig',
  () => {
    const slideCollapsed = ref<boolean>(false);
    function updateSlideCollapsed(collapsed: boolean) {
      slideCollapsed.value = collapsed;
    }
    const dataSlideCollapsed = ref<boolean>(false);
    function updateDataSlideCollapsed(collapsed: boolean) {
      dataSlideCollapsed.value = collapsed;
    }
    return {
      slideCollapsed,
      updateSlideCollapsed,
      dataSlideCollapsed,
      updateDataSlideCollapsed,
    };
  },
  {
    persist: true,
  },
);

export default useSystemConfig;
